﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:behaviours="clr-namespace:MahApps.Metro.Behaviours;assembly=MahApps.Metro"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:effect="clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect"
        xmlns:Models="clr-namespace:MetroDemo.Models" x:Class="MetroDemo.PanoramaDemo"
		Background="Black"
        Title="PanoramaDemo" Height="600" Width="900" KeyUp="Window_KeyUp">
    <Window.Resources>
        <ResourceDictionary>
            
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"/>

            </ResourceDictionary.MergedDictionaries>

            <DataTemplate DataType="{x:Type Models:Artist}">
                <Controls:Tile Title="{Binding Name}" Width="120" Height="120">
                    <Image Source="images/placeholder_person.gif" Opacity="0.5"  Stretch="UniformToFill">
                        <Image.Effect>
                            <effect:GrayscaleEffect x:Name="grayscaleEffect"/>
                        </Image.Effect>
                    </Image>
                </Controls:Tile>
            </DataTemplate>

            <DataTemplate DataType="{x:Type Models:Album}">
                <Controls:Tile Title="{Binding Title}" Width="120" Height="120">
                    <Image Source="images/blank-cd.png" Opacity="0.5"  Stretch="UniformToFill">
                        <Image.Effect>
                            <effect:GrayscaleEffect x:Name="grayscaleEffect"/>
                        </Image.Effect>
                    </Image>
                </Controls:Tile>
            </DataTemplate>

            <!--<DataTemplate DataType="{x:Type Models:Track}">
                <Controls:Tile Title="{Binding name}"  Width="120" Height="120">

                    <Image Source="{Binding LargeImage}" Opacity="0.5"  Stretch="UniformToFill">
                        <Image.Effect>
                            <effect:GrayscaleEffect x:Name="grayscaleEffect"/>
                        </Image.Effect>
                    </Image>
                </Controls:Tile>
            </DataTemplate>-->
        </ResourceDictionary>

    </Window.Resources>
    <i:Interaction.Behaviors>
        <behaviours:BorderlessWindowBehavior ResizeWithGrip="True" EnableDWMDropShadow="True" AllowsTransparency="False" />
    </i:Interaction.Behaviors>
    <Grid>
    	<Grid.Background>
    		
		<RadialGradientBrush RadiusY="0.844" RadiusX="0.879" Center="0.269,0.107" GradientOrigin="0.269,0.107">
			<GradientStop Color="{DynamicResource AccentColor}"/>
			<GradientStop Color="{DynamicResource AccentColor3}" Offset="0.987"/>
		</RadialGradientBrush>  	
		</Grid.Background>

        <Controls:Panorama x:Name="MainPanorama" VerticalAlignment="Stretch" Margin="0,25,25,25" ItemBox="140" ItemsSource="{Binding Groups}" />
        <Controls:ProgressRing IsActive="{Binding Busy}" VerticalAlignment="Center" HorizontalAlignment="Center" />
    </Grid>
</Window>
